home *** CD-ROM | disk | FTP | other *** search
/ Ray Dream Studio 5 / Ray Dream.iso / pc / DreamSDK / Windows / INCLUDES / I3DSHSCN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-11  |  6.2 KB  |  129 lines

  1. /* $Id: I3DSHScn.H 1.22 1997/06/18 19:42:04 joshua-pc Exp $ */
  2. /*****************************************************************************\
  3. *                                                                             *
  4. * I3DShScn.h                                                                                *
  5. *   I3DShScene definition                                                     *
  6. *                                                                             *
  7. *           Copyright (c) 1995, Ray Dream, Inc. All rights reserved.          *
  8. *                                                                             *
  9. \*****************************************************************************/
  10.  
  11. #ifndef __I3DSHSCN__
  12. #define __I3DSHSCN__
  13.  
  14. #ifndef _COMPOBJ_H_
  15. #include "RCompObj.h"
  16. #endif
  17.  
  18. #ifndef __3DBSTYPE__
  19. #include "3DBsType.h"
  20. #endif
  21.  
  22. /*#ifndef __I3DSHOBJ__
  23. #include "I3DShObj.h"
  24. #endif*/
  25.  
  26. /*#ifndef __I3DSHTRE__
  27. #include "I3DShTre.h"
  28. #endif*/
  29.  
  30. struct I3DShObject;
  31. struct I3DShTreeElement;
  32. struct I3DShGroup;
  33. struct I3DShInstance;
  34. struct I3DShLightsource;
  35. struct I3DShCamera;
  36. struct I3DExGenericData;
  37.  
  38. //****** Globally Unique Ids **************************************************
  39.  
  40. DEFINE_GUID(IID_I3DShScene, 0xD4E4AC00L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  41.  
  42. struct SceneStatistic {
  43.     long fNumberofObject;
  44.     long fNumberofLight;
  45.     long fTextureMapSurface;
  46.     long fTextureMapSize;
  47.     };
  48.  
  49. /*****************************************************************************\
  50. *  I3DShScene                                                                 *
  51. *                                                                             *
  52. *    Topmost data structure that contains all the data of a scene.            *
  53. *                                                                             *
  54. \*****************************************************************************/
  55.  
  56. struct I3DShEnvironment;
  57.  
  58. #undef  INTERFACE
  59. #define INTERFACE   I3DShScene
  60.  
  61. DECLARE_INTERFACE_(I3DShScene, IUnknown) {
  62.     // IUnknown methods
  63.   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  64.   STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  65.   STDMETHOD_(ULONG, Release) (THIS) PURE;
  66.  
  67.     // I3DShScene methods
  68.     //-- 3D Objects list
  69.     STDMETHOD_(ULONG, Get3DObjectsCount) (THIS) PURE;
  70.     STDMETHOD_(I3DShObject*, Get3DObjectByIndex) (THIS_ ULONG index) PURE;    // index is 1 based
  71.     STDMETHOD_(I3DShObject*, Get3DObjectByName) (THIS_ char* name) PURE;
  72.     STDMETHOD(Insert3DObject) (THIS_ I3DShObject* object) PURE;
  73.     STDMETHOD(Remove3DObject) (THIS_ I3DShObject* object) PURE;
  74.     STDMETHOD(Changed3DObject) (THIS_ I3DShObject* object) PURE;
  75.     //-- Tree root (Universe) setting
  76.     STDMETHOD_(I3DShGroup*, GetTreeRoot) (THIS) PURE;
  77.     STDMETHOD(SetTreeRoot) (THIS_ I3DShGroup* universe) PURE;        // Works only if there was no tree root in the scene
  78.     STDMETHOD(CreateTreeRootIfNone) (THIS) PURE;
  79.     //-- Quick tree access
  80.     STDMETHOD_(I3DShTreeElement*, GetTreeElementByName) (THIS_ char* name) PURE;
  81.     STDMETHOD_(ULONG, GetInstancesCount) (THIS) PURE;
  82.     STDMETHOD_(I3DShInstance*, GetInstanceByIndex) (THIS_ ULONG index) PURE;    // index is 1 based
  83.     STDMETHOD_(ULONG, GetLightsourcesCount) (THIS) PURE;
  84.     STDMETHOD_(I3DShLightsource*, GetLightsourceByIndex) (THIS_ ULONG index) PURE;    // index is 1 based
  85.     STDMETHOD_(ULONG, GetCamerasCount) (THIS) PURE;
  86.     STDMETHOD_(I3DShCamera*, GetCameraByIndex) (THIS_ ULONG index) PURE;    // index is 1 based
  87.     //-- Misc. render settings
  88.     STDMETHOD(SetProductionFormat) (THIS_ NUM3D sizeh, NUM3D sizev, NUM3D dpi) PURE;    // sizeh and sizev in points (=1/72 inch)
  89.     STDMETHOD(GetProductionFormat) (THIS_ NUM3D* sizeh, NUM3D* sizev, NUM3D* dpi) PURE;    // sizeh and sizev in points (=1/72 inch)
  90.     STDMETHOD(CreateRenderingCameraIfNone) (THIS_ ULONG cameraType, BOOLEAN createDistantLight) PURE;
  91.     STDMETHOD_(I3DShCamera*, GetRenderingCamera) (THIS) PURE;
  92.     STDMETHOD(SetRenderingCamera) (THIS_ I3DShCamera* camera) PURE;
  93.     //-- Misc. Animation
  94.     STDMETHOD_(ULONG, GetTime) (THIS_ NUM3D* ticks) PURE;
  95.     //-- Misc. Utilities (API level 6)
  96.     STDMETHOD(GetProductionFormatBBox) (THIS_ BOX2D* prodFormat, NUM3D* dpi) PURE;    // New call for non centered production frame. Use instead of GetProductionFormat
  97.     STDMETHOD(GetFullPathName) (THIS_ char* pathName) PURE;
  98.     
  99.     STDMETHOD_(I3DShTreeElement*, GetTreeElementFromFullName)(THIS_ char* fullName) PURE; // Returns instance with given full "path name" or NULL if no such instance is in the hierarchy
  100.     STDMETHOD(GetAmbientLight) (THIS_ COLOR3D* color) PURE;
  101.     //-- Better render settings access (API level 7), using 'renderHelper'
  102.     STDMETHOD(GetProductionFormatBBox7) (THIS_ BOX2D* prodFormat, NUM3D* dpi, void* renderHelper) PURE;    // Use this call if you have a renderHelper (see Post Render Filters). renderHelp=NULL gives same behavior as GetProductionFormatBBox()
  103.     STDMETHOD_(I3DShCamera*, GetRenderingCamera7) (THIS_ void* renderHelper) PURE;    // Use this call if you have a renderHelper (see Post Render Filters). renderHelp=NULL gives same behavior as GetRenderingCamera()
  104.     // API v9
  105.     STDMETHOD(SetTime9) (THIS_ ULONG microticks, Boolean UpdateViews) PURE;
  106.     STDMETHOD(GetFPS) (THIS_ short* fps) PURE;
  107.     STDMETHOD(GetSceneStatistics) (THIS_ SceneStatistic& sceneStat) PURE;
  108.     //-- Collision detection (API level 9)
  109.     STDMETHOD_(Boolean, DetectCollisionWithObject) (THIS_ I3DShTreeElement* object1, I3DShTreeElement* object2, CollisionInfo& ci, short SurfaceFidelity, Boolean UseVelocity, VECTOR3D Velocity1,VECTOR3D Velocity2) PURE;
  110.     STDMETHOD_(Boolean, DetectCollisionWithScene) (THIS_ I3DShTreeElement* object1, CollisionInfo& ci, short SurfaceFidelity, Boolean UseVelocity, VECTOR3D Velocity1, VECTOR3D Velocity2) PURE;
  111.     //-- Animation Values
  112.     STDMETHOD(GetAnimationValues) (THIS_ long *begin, long *end, long *frameRate) PURE;
  113.  
  114.     //-- Comments
  115.     STDMETHOD(GetComment) (THIS_ char* comment) PURE;
  116.     STDMETHOD(SetComment) (THIS_ char* comment) PURE;
  117.  
  118.     //-- Data Components
  119.     STDMETHOD_(ULONG, GetDataComponentsCount) (THIS) PURE;
  120.     STDMETHOD_(I3DExGenericData*, GetDataComponentByIndex) (THIS_ ULONG index) PURE;    // index is 1 based
  121.  
  122.     // --- Environment ---
  123.     STDMETHOD_(I3DShEnvironment*, GetEnvironment) (THIS) PURE;
  124.     STDMETHOD_(COLOR3D, GetAmbientLightColor) (THIS) PURE;
  125.     };
  126.  
  127. #endif
  128.  
  129.